1. Field of the Invention
The present invention relates to an image forming apparatus, a drawing method, and a storage medium.
2. Description of the Related Art
In recent years, along with enhanced drawing functions of various applications and devices operating on a client personal computer (PC), printers have also become capable of drawing using various drawing functions. In particular, to draw conventional text information or rectangular information, even when the same image is drawn, various drawing methods can be used including a drawing method using mask data with a raster operation (ROP) and a drawing method using vector information.
For example, when an object “1” 201 included in a page 200 as illustrated in FIG. 1 is drawn, as indicated as “mask drawing”, an image is drawn using filling information 202 and mask information 203 specifying the ROP function. The mask information 203 includes information indicating “on” or “off”. A background (background color (white) on the page here) is selected for a coordinate position of “off”. An ROP instruction for disposing a color of filling information 202 is given for the coordinate position of “on”. The image forming apparatus realizes the drawing of the object “1” 201 by selecting “on” or “off” for each coordinate position.
Further, as indicated as “edge drawing”, the image forming apparatus can perform drawing using the filling information 202 and edge information 204. By a drawing method of filling a region defined by arrows, such as the edge information 204, with the filling information 202, drawing of the object “1” 201 can be also realized.
Japanese Patent Application Laid-Open No. 2006-048172 discusses a technique for selecting a drawing method depending on a threshold value of the number of predetermined passes provided in advance. The drawing method to be selected for each object includes a method of drawing using the ROP function and the mask information 203 and a method of drawing using the filling information 202 and the edge information 204. Such a technique is discussed for realizing drawing by an optimum drawing method using selection processing.
However, when the selection is determined only with the predetermined threshold value as described above, the threshold value may not be optimum depending on a relationship with other objects, and may cause a deterioration in performance. For example, as illustrated in FIG. 2, a case for drawing a drawing position 303 in a page 300 including an object “2” 301 overlapping an image 302 will be described. When the object “2” 301 is drawn by the mask drawing, preparation processing for color information about the object “2” 301 needs to be performed seven times, for example. Further, the preparation processing for the color information about the image 302 also needs to be performed seven times.
On the other hand, when the object “1” 201 is drawn, the preparation processing for the color information about the object “1” 201 needs to be performed seven times, for example. Since the color information about the page 200 is single-color filling information, the preparation processing for the color information thereabout is completed with only one time performance. Therefore, when the mask drawing is performed, a load necessary for the mask drawing varies depending on whether a drawing object on which the mask drawing is performed is related to other objects.